/*
 * @Date         : 2022-06-07 18:49:06
 * @LastEditors  : zu1662
 * @LastEditTime : 2022-06-07 19:52:18
 * @Description  : 数据库配置项
 * 
 * Copyright © 2022 by zu1662, All Rights Reserved. 
 */
import { registerAs } from "@nestjs/config";

export default registerAs(
  "database",
  (): Record<string, any> => ({
    host: process.env.DATABASE_HOST || "127.0.0.1",
    port: process.env.DATABASE_port || 3306,
    username: process.env.DATABASE_USERNAME || "root",
    password: process.env.DATABASE_PASSWORD || 'root',
    dbname: process.env.DATABASE_DBNAME || 'wepie',
  })
);
